package Factory.interfaces;

import java.util.ArrayList;
import java.util.List;

/**
 * @Author: pengzx
 * @Description:
 * @Date: 10:10 2017/9/7
 * @Modified by: 1.0
 */
public abstract class Pizza {
   protected String name;
   protected String dough;
   protected String sauce;
   protected List<String> toppings = new ArrayList<String>(0);
   public void prepare(){
       System.out.println("Preparing "+name);
       System.out.println("Tossing dough...");
       System.out.println("Adding sauce...");
       System.out.println("Adding topping:");
       for (int i = 0,j=toppings.size();j<i;i++){
           System.out.println("  "+toppings.get(i));
       }
   }
   public void bake(){
       System.out.println("Bake for 25 minutes 350");
   }
   public void cut(){
        System.out.println("Cutting the pizza...");
    }
   public void box(){
        System.out.println("Place pizza in official PizzaStore box.");
    }

    public String getName()
    {
        return name;
    }
}
